package com.example.seckill.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Classname DemoController
 * @Description 测试demo
 * @Date 2021/1/30 0:46
 * @Created by Wang Xu
 */

@Controller
@RequestMapping("/demo")
public class DemoController {

    /**
     * @description: 页面跳转
     * @param: [model]
     * @return: java.lang.String
     * @author: wangxu
     * @date: 2021/1/30 1:05
     */
    @RequestMapping("/hello")
       public String hello(Model model) {
        model.addAttribute("name", "xxxx1111");
        return "hello";
    }

    @RequestMapping("/hello1")
    @ResponseBody
    public String hello1() {
        return "hello1";
    }
}
